<form id="add-form" class="form-horizontal form-ajax nice-validator n-default n-bootstrap" role="form" data-toggle="validator" method="POST" action="{:url('edit_article')}" novalidate="novalidate">
    <input type="hidden" name="id" value="{$article.id}">
    <div class="form-group">
        <label for="title" class="control-label col-xs-12 col-sm-2">文章标题:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" name="title" id="title" value="{$article.title}" class="form-control">
        </div>
    </div>

    <div class="form-group">
        <label for="type" class="control-label col-xs-12 col-sm-2">文章类型:</label>
        <div class="col-xs-12 col-sm-8">
            <select name="type" id="type" class="form-control">
                {foreach name="filetype" item="vo"}
                    <option value="{$vo.id}" {if condition="$vo.id eq $article.type"}selected{/if}>{$vo.type_name}</option>
                {/foreach}
            </select>
        </div>
    </div>

    <div class="form-group">
            <label for="type" class="control-label col-xs-12 col-sm-2">城市选择:</label>
            <div class="col-xs-12 col-sm-8">
                <select name="city" id="city" class="form-control">
                    {volist name="citylist" id="vo"}
                        <option value="{$vo.id}"> {$vo.areaname}</option>
                    {/volist}
                </select>
            </div>
        </div>
    <div class="form-group">
        <label for="uname" class="control-label col-xs-12 col-sm-2">编辑人:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" name="uname" id="uname" value="{$article.uname}" class="form-control">
        </div>
    </div>

    <div class="form-group">
        <label for="container" class="control-label col-xs-12 col-sm-2">文章内容:</label>
        <div class="col-xs-12 col-sm-8">
            <script id="container" name="content" type="text/plain" style="width: 100%;height: 300px;">{:htmlspecialchars_decode($article.content)}</script>
        </div>
    </div>

    <div class="form-group">
        <label for="status" class="control-label col-xs-12 col-sm-2">文章状态:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="radio" name="status" id="status" value="1" {if condition="$article.status eq 1"}checked{/if}>正常
            <input type="radio" name="status" id="" value="0" {if condition="$article.status eq 0"}checked{/if}>隐藏
        </div>
    </div>

    <div class="form-group layer-footer">
        <div class="col-xs-2"></div>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed">提交</button>
            <button type="reset" class="btn btn-default btn-embossed">重置</button>
        </div>
    </div>
</form>
<!-- 配置文件 -->
<script type="text/javascript" src="/assets/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="/assets/ueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var editor = UE.getEditor('container');
</script>
